﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FilterRunner;

namespace Demo
{
    public class CheckUserRunnerFilter<T> : IRunnerFilter<T>
    {
        public int Sequence { get; set; }
        public RunnerMessage Run(T targetObj, out bool isContinueRunNext)
        {
            isContinueRunNext = true;

            if (targetObj==null)
            {
                isContinueRunNext = false;
                return new RunnerMessage() {IsSuccess = false, StatusCode = 500, Message = "targetObj is null"};
            }

            return new RunnerMessage() { IsSuccess = true, StatusCode = 500, Message = "success" };

        }
    }
}
